package com.wms_backend.controller;

import com.alibaba.fastjson.JSONObject;
import com.wms_backend.entity.Result;
import com.wms_backend.service.BasicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/basic")
public class BasicController {

    @Autowired
    private BasicService basicService;

    @PostMapping("/login")
    public Result login(@RequestBody JSONObject param) {
        return basicService.login(param);
    }

    @PostMapping("/register")
    public Result register(@RequestBody JSONObject param) {
        return basicService.register(param);
    }


}
